﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using RESTVentas.Dominio;
using System.ServiceModel.Web;

namespace RESTVentas
{
  


    [ServiceContract]
    public interface IVentaService
    {
        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "Ventas", ResponseFormat = WebMessageFormat.Json)]
        Venta CrearVenta(Venta VentaACrear);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Ventas/{IdVenta}", ResponseFormat = WebMessageFormat.Json)]
        Venta ObtenerVenta(string IdVenta);

        [OperationContract]
        [WebInvoke(Method = "PUT", UriTemplate = "Ventas", ResponseFormat = WebMessageFormat.Json)]
        Venta ModificarVenta(Venta VentaAModificar);

        [OperationContract]
        [WebInvoke(Method = "DELETE", UriTemplate = "Ventas/{IdVenta}", ResponseFormat = WebMessageFormat.Json)]
        void EliminarVenta(string IdVenta);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Ventas", ResponseFormat = WebMessageFormat.Json)]
        List<Venta> ListarTodos();
    }
}
